import React, { useState} from 'react';
import { useHistory } from 'react-router-dom'

import img11 from '@a/images/notice/11_03.png'

import { Container, NavLi } from './StyleNoticeRight'

const NoticeLeft = (props) => {
    let history = useHistory()
    let [state] = useState({
        noticelist: props.list
    })
    return (
        <Container>
            {
                state.noticelist.map(v => {
                    return <div className="notice2" key={v.tuId} >
                        <p>
                            <img src={img11} alt="" />
                        </p>
                        <ul>
                            <NavLi
                                width="0 0 1px 0"
                                color="#666"
                                onClick={() => { history.push('/noticeCommon', v) }}>{v.tzName}</NavLi>
                            <li >{v.tzDate}</li>
                        </ul>
                    </div>
                })
            }          
        </Container>
    );
}

export default NoticeLeft;